TITLE seagullbird_t15
.MODEL SMALL
.DATA
	ARRAY DW 8, 6, 4, 2, -2
.CODE
MAIN PROC FAR
	ASSUME CS:_TEXT, DS:_DATA
	PUSH DS
	XOR AX, AX
	PUSH AX
	MOV AX, @DATA
	MOV DS, AX

	MOV CL, 5
	LEA BX, ARRAY
	MOV AX, [BX]
	LP:
		CMP CL, 0
		JZ QUIT
		DEC CL
		MOV DX, [BX]
		MOV SI, DX
		RCR DX, 1
		JNC	JUDGE				; EVEN
		ADD BX, 2
		JMP LP

	JUDGE:
		CMP SI, AX
		JL NEW_MIN
		ADD BX, 2
		JMP LP

	NEW_MIN:
		MOV AX, SI
		ADD BX, 2
		JMP LP

	QUIT:
		RET
MAIN ENDP
	END MAIN